package com.ruoyi.system.mapper;


import com.ruoyi.system.domain.OrderAttachment;
import com.ruoyi.system.domain.RxOrder;
import com.ruoyi.system.domain.RxOrderFollow;
import com.ruoyi.system.domain.RxOrderVo;
import com.ruoyi.system.domain.vo.OrderDetailVo;
import com.ruoyi.system.domain.vo.ReceiveOrderCountVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 订单Mapper接口
 *
 * @author hjf
 * @date 2025-02-13
 */
public interface RxOrderMapper {


    public RxOrder selectRxOrderById(Long id);

    public RxOrder selectRxOrderByDouDianId(String id);

    public OrderDetailVo selectRxOrderBySerial(String serial);

    RxOrder getOrderListByIdentificationNumber(String identificationNumber);


    List<RxOrder> getOrderListByIdentificationNumbers(@Param("ids") Set<String> ids);

    public List<OrderAttachment> selectByOrderIds(@Param("orderIds") List<String> orderIds);

    public List<RxOrderFollow> selectFailByOrderIds(@Param("orderIds") List<String> orderIds);

    public List<RxOrderVo> selectRxOrderList(RxOrder rxOrder);

    List<RxOrder> selectRxOrderListByIdentificationNumber(@Param("identificationNumber") String identificationNumber);

    public List<RxOrder> selectRxOrderExportList(RxOrder rxOrder);

    public List<RxOrderVo> selectOrderFollowByIds(@Param("ids") List<String> ids);

    List<RxOrderVo> selectStateListByIds(@Param("ids") List<Long> ids);

    List<RxOrder> selectCommissionListByIds(@Param("ids") Set<Long> ids);

    List<RxOrderVo> selectRxOrderChaoShiList();

    List<RxOrder> selectAuditChaoShi47List();

    List<RxOrder> selectAuditChaoShi24List();


    public int insertRxOrder(RxOrder rxOrder);


    public int updateRxOrder(RxOrder rxOrder);

    void batchUpdateRxOrder(@Param("list") List<RxOrder> list);

    void batchUpdateState6(@Param("list") List<RxOrder> list);

    public int updateOrderTelAndForce(RxOrder rxOrder);


    public int deleteRxOrderById(Long id);

    public int deleteRxOrderByIds(Long[] ids);


    public List<RxOrder> getNotAllocationOrders();


    public int getHasReceiveOrderByUserId(@Param("userId") Long userId);

    public List<ReceiveOrderCountVo> getHasReceiveOrderByUserIds(@Param("userIds") Set<Long> userIds);

    public int updateReceiveOrderUserIdById(@Param("userId") Long userId, @Param("id") Long id);


    int batchUpdateReceiveOrderUserId(@Param("userId") Long userId, @Param("orderIds") List<Long> orderIds);

    int batchUpdateByGenJin10(@Param("orderList") List<RxOrder> orderList);

    int batchUpdateByContrastRuZhang(@Param("orderList") List<RxOrder> orderList);

    OrderDetailVo getOrderDetailById(Long id);

    int updateRxOrderByAuthBack(RxOrder rxOrder);

    int updateRxOrderByRecall(RxOrder rxOrder);

    List<RxOrder> getOrderListsByIdentificationNumbers(@Param("ids") Set<String> ids);

}
